import request from '@/utils/request'

// -------------------------------------------------------------------------------------库存台账接口文档----------------------------------------------------------------------------

// 获取基值管理列表---------------------------------------- 
export function list (params) {
  return request({
    url: '/function/storehouse/consumable/list',
    method: 'get',
    params
  })
}

// 获取基值管理列表详情---------------------------------------- 
export function listDetail (ids) {
  return request({
    url: '/function/storehouse/consumable/' + (ids.userid ? ids.userid : -1) + '/' + ids.id + '/' + ids.priceid,
    method: 'get',
  })
}

//台账详情： 获取入库列表---------------------------------------- 
export function listWarehousing (params) {
  return request({
    url: '/function/warehousing/consumable/list',
    method: 'get',
    params
  })
}
//台账详情： 获取出库列表---------------------------------------- 
export function listDeliver (params) {
  return request({
    url: '/function/deliver/consumable/list',
    method: 'get',
    params
  })
}
//台账详情： 获取更换记录列表---------------------------------------- 
export function listReplaceRecord (params) {
  return request({
    url: '/function/equipment/consumable/replaceRecord/vo/list',
    method: 'get',
    params
  })
}

// //新增： 获取供应商列表---------------------------------------- 
// export function listSupplier (params) {
//   return request({
//     url: '/function/supplier/list',
//     method: 'get',
//     params
//   })
// }

// //新增： 获取适用设备列表---------------------------------------- 
// export function listApplicable (params) {
//   return request({
//     url: '/function/equipment/account/partInfo/list',
//     method: 'get',
//     params
//   })
// }

// //新增： 提交接口---------------------------------------- 
// export function add (data) {
//   return request({
//     url: '/function/consumable/base',
//     method: 'post',
//     data
//   })
// }
// // 修改：修改基质列表接口---------------------------------------
// export function update (data) {
//   return request({
//     url: '/function/consumable/base',
//     method: 'put',
//     data
//   })
// }
// -------------------------------------------------------------------------------------仓库管理接口文档----------------------------------------------------------------------------

// 获取仓库管理列表---------------------------------------- 
export function listSort (params) {
  return request({
    url: '/function/storehouse/list',
    method: 'get',
    params
  })
}

// 修改仓库管理状态接口--启用，禁用-------------------------------------
export function statusSort (data) {
  return request({
    url: '/function/storehouse/changeStatus',
    method: 'put',
    data
  })
}

// 新增仓库管理接口---------------------------------------
export function addSort (data) {
  return request({
    url: '/function/storehouse',
    method: 'post',
    data
  })
}

// 获取仓库管理区域，仓库--列表---------------------------------------- 
export function RegionalList (params) {
  return request({
    url: '/function/storehouse/treeselect',
    method: 'get',
    params
  })
}

// 查询仓库管理详情列表---------------------------------------- 
export function listDetailSort (id) {
  return request({
    url: '/function/storehouse/' + id,
    method: 'get',
  })
}

// 修改仓库管理详情接口---------------------------------------
export function updateSort (data) {
  return request({
    url: '/function/storehouse',
    method: 'put',
    data
  })
}